import * as constants from './constants';
import { fromJS } from 'immutable';
import avatar from '../../../assets/images/face.jpg';

const defaultState=fromJS({
    collapsed:false,
    avatar,
    title:"后台管理系统"
});
export default (state=defaultState,action)=>{
    switch (action.type) {
        case constants.ICON_TOGGLE:
            return state.set('collapsed',!action.value);
        case constants.HOME_TITLE:
            return state.set('title',action.value);
        default:
            break;
    }
    return state;
}